/*
 * N900Resolve.h
 *
 *  Created on: Aug 30, 2016
 *      Author: ubuntu
 */

#ifndef N900_N900RESOLVE_H_
#define N900_N900RESOLVE_H_

#include <iostream>
#include <queue>
#include <pthread.h>
#include "N900Summary.h"

class DBPool;

class N900Resolve {
public:
	N900Resolve();
	virtual ~N900Resolve();

	virtual void push(N900Summary *pSummary);
	virtual void run();
	virtual void stop();
	virtual void getBuf(unsigned char *buf, size_t n);

protected:
	void writeDB(N900Summary *);

private:
	queue<N900Summary *> m_lstSummary;
	pthread_mutex_t m_summa_mutex;

	DBPool *m_pDBPool;

	bool m_bTerminated;
};



#endif /* N900_N900RESOLVE_H_ */
